package svn.project;

import java.io.File;

import org.tmatesoft.svn.core.SVNException;
import org.tmatesoft.svn.core.SVNLock;
import org.tmatesoft.svn.core.wc.SVNStatus;
import org.tmatesoft.svn.core.wc.SVNStatusClient;
import org.tmatesoft.svn.core.wc.SVNStatusType;


public class SVNStatusManager {
	public SVNStatusManager(String url) {
		SETClientManager scm = new SETClientManager(url);
		statusClient = scm.getSVNStatusClient();
		System.out.println("statusClient");
	}
	
	public void setLocalStatusClient(File aFile) {
		try{
			status = statusClient.doStatus(aFile, false);
		} catch(SVNException svne) {
			System.out.println(svne);
		}
	}
	
	public void setRemoteStatusClient(File aFile) {
		try{
			status = statusClient.doStatus(aFile, true);
		} catch(SVNException svne) {
			System.out.println(svne);
		}
	}
	
	public SVNLock getLock() {
		return status.getRemoteLock();
	}
	
	public SVNStatusType getContentsStatus() {
		return status.getContentsStatus();
	}
	
	public SVNStatusType getPropertiesStatus() {
		return status.getRemotePropertiesStatus();
	}
	
	private SVNStatusClient statusClient;
	private SVNStatus status;
}
